import java.io.IOException;
import java.net.SocketException;
import java.util.HashMap;

public class Demo3 extends Demo1{


    private HashMap<String, String > hashMap = new HashMap<>();

    public Demo3(int p) throws SocketException {
        super(p);

        hashMap.put("小猫", "cat");
        hashMap.put("小狗", "dog");
        hashMap.put("人类", "people");
        hashMap.put("哇哈哈", "wahaha");
        hashMap.put("荣耀战魂", "For Honor");

    }



    @Override
    public String poccess(String s1) {
        return hashMap.getOrDefault(s1, "没有该词条");

    }

    public static void main(String[] args) throws IOException {
        Demo3 demo3 = new Demo3(6636);
        demo3.start();
    }
}
